<?php
namespace app\index\controller;

use app\common\controller\Base;
use think\Request;

//公告类

class Notice extends Base
{
    protected $model;

    /**
     * 控制器初始化
     * @return   void
     */
    public function _initialize()
    {
        //基类授权
        //
        parent::_initialize();
        $this->model = new \app\index\model\Notice();
    }
    /**
     * 添加
     */
    public function add(Request $request)
    {

        $res = $this->model->doAdd($request);

        $output['success'] = $res ? true : false;
        $output['msg'] = $res ? '新增成功' : '新增失败';

        _callback($output);
    }
}
